Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
Stop "loading" video if not in viewport

Let's say I have 30 high quality videos on my page and my bandwidth is limited. Once the page is opened, I quickly scroll to the 20th video and I'm trying to watch it. Currently, that video is the only video in my viewport. So right now, I don't want my browser to "load" other videos. Because otherwise it will waste my bandwidth, and it will probably cause buffering issues in the 20th video. (the video I'm trying to watch now)

But If I can somehow stop "loading" the other videos, then browser can use all it's bandwidth in the 20th video, and then I will be able to watch the video without buffering.

To make it clear, I'm not talking about playing/pausing videos, I'm talking about "loading" the playback. I want it to stop if the video is not in viewport.

Is it possible?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

use preload attribute in your video tag and set it to none.

<video controls preload="none" poster="video-poster.jpg">
  <source src="video-name.webm" type="video/webm">
  <source src="video-name.mp4" type="video/mp4">
</video>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!